First Document Verification
Welcome to the first document verification process using our API! If you've already configured API integration, you're one step closer to verifying your identification document seamlessly.
In this example we will create applicant, verification, list the ways to upload documents for verification and get the results of verification
Prerequisites
- Make sure your have obtained API key, how to do it described in getting started page
- For SDK variant, check out index page
- Configure your environment within API Key:
- Curl
- Python
export API_KEY=<YOUR_API_KEY>
from dataspike import *
api = SyncApi("<YOUR_API_KEY>")
Step 1: Create Applicant
Begin by creating an applicant profile. Make a POST request to the API endpoint /applicants with the optional applicant details, such as name, contact information or other identification data.
- Curl
- Python
curl -H "ds-api-token: $API_KEY" -X POST "https://api.dataspike.io/api/v3/applicants" \
--data {"external_id": "12345678"}
Response:
{
"id": "01827ed4-c928-7a3c-9a30-7ab7cc169d11" // This is your client internal id in the Dataspike system
}
applicant = await api.applicant.create()
Step 2: Create Verification for an Applicant
Next, create a verification request for the applicant. Make another POST request to the API endpoint /verifications with the applicant's unique identifier applicant_id
- Curl
- Python
curl -H "ds-api-token: $API_KEY" -X POST "https://api.dataspike.io/api/v3/verifications" \
--data {"applicant_id": "01827ed4-c928-7a3c-9a30-7ab7cc169d11"}
Example of response
{
"id": "1eeaf95c-4467-6fe4-ab37-7d17691dcf95",
"organization_id": "oa47dba3b9271f754",
"account_id": "api",
"account_email": "api",
"applicant_id": "01827ed4-c928-7a3c-9a30-7ab7cc169d11",
"status": "initial",
"checks": {
"liveness": {
"status": "pending",
"errors": [],
"pending_documents": [
"liveness_photo"
],
"data": null
},
"face_comparison": {
"status": "pending",
"errors": [],
"pending_documents": [
"selfie",
"passport",
"residence_permit_front",
"id_card_front",
"liveness_photo"
],
"data": null
},
"document_mrz": {
"status": "pending",
"errors": [],
"pending_documents": [
"id_card_back",
"passport",
"residence_permit_back",
"residence_permit_front",
"id_card_front"
],
"data": null
}
},
"created_at": "2024-01-10T08:53:47.305483453Z",
"settings": {
"poi_required": true,
"poi_allowed_documents": [
"passport",
"residence_permit",
"id_card"
],
"face_comparison_required": true,
"face_comparison_allowed_documents": [
"selfie",
"liveness_photo"
],
"poa_required": false,
"poa_allowed_documents": [
"poa_utility_bill",
"poa_bank_statement",
"poa_residence_registration",
"poa"
],
"name": "default",
"allow_desktop": true
},
"profile_id": "018737a1-1ec3-7fd4-9cda-27a016bbcb72",
"is_sandbox": false,
"verification_url": "https://am.dataspike.io/V9E1E945B506BBDD7",
"verification_url_id": "V9E1E945B506BBDD7",
"expires_at": "2024-01-10T12:53:47Z"
}
verification = await api.verification.create()
As a response, you will receive the verification details, including the verification_url
and verification_url_id
.
Note that the verification was created using the default verification profile. Verification profiles are used to configure verification flow. You can specify a verification profile using the profile_id field during creation. You can configure verification profile via API or Dashboard
Step 3: Submit Documents
Submit the identification documents for verification. You have three options to choose from:
-
Provide our URL to your client and wait for a webhook event with the verification result.
-
Integrate our web SDK into your website using the developer instructions provided in this link. Example with initialization:
DocsVerificationWidget({
id: 'VF57124F182867E0',
elementId: 'root',
apiUrl: 'https://api.dataspike.io',
});
- Utilize your own workflow and provide client documents to us using our API.
Step 4: Start Verification Process (Optional)
If you decide to manually integrate the verification process into your workflow, you will need to call the proceed endpoint to notify us that you have completed the document submission and wish to proceed with the verification.
- Curl
- Python
curl -H "ds-api-token: $API_KEY" -X POST "https://api.dataspike.io/api/v3/verifications/$VERIFICATION_UUID/proceed"
await api.verification.proceed(verification.id)
Please note that the WebSDK widget comes with built-in functionality and automatically handles this process, making it the recommended method for integrating our functionality into your system.
Step 5: Receive Result via Webhook or Check via API Manually
Option 1 (Webhook): To receive real-time updates on the verification result, configure a webhook URL and register it with Dataspike. We will send webhook events with the verification results.
Option 2 (Check Manually): Alternatively, you can manually check the verification status by making a GET request to the API endpoint /verification-status/verification_request_id with the applicant's unique verification_request_id
. This will return the current verification status.
Congratulations! You've successfully completed the first document verification process using our API. For any questions or support, please contact our team at [email protected]. Happy verifying!